<template lang="html">
  <div class="comment_wrap">
    <div class="comment_con">
      <div class="avatar">
        <img src="http://placehold.it/44x44" />
      </div>
      <div class="content">
        <div class="radius"></div>
        <div class="comment">
          <p>用户<span>{{name}}</span>刚发表评论: <span class="time">1秒前</span></p>
          <p>“我TM 要是再买<span>南山控股</span>就是脑子被门夹了”</p>
        </div>
      </div>

    </div>
  </div>
</template>

<script>
export default {
  data () {
    return {
      name: '我不是韭菜',
      comment: '“我TM 要是再买南山控股就是脑子被门夹了”'
    }
  }

}
</script>

<style lang="less" scoped>

.comment_wrap {
  padding: 17px 0;
  background-color: #FBFBFC;
  font-size: 12px;
}
.comment_con {
  width: 90%;
  height: 45px;
  margin: 0 auto;
  display: flex;
  position: relative;
}
.avatar {
  width: 44px;
  height: 44px;
  position: absolute;
  z-index: 100;
  img {
    border-radius: 50%;
    width: 100%;
    height: 100%;
  }
  &::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    background: url('../../../assets/images/dalaba@2x.png') no-repeat right bottom/17px 17px;
  }
}
.content {
  left: 11%;
  top: 0;
  width: 90%;
  height: 45px;
  position: absolute;
  .radius {
    position: absolute;
    left: 0;
    top: 20%;
    background-color: #f1f3f6;
    width: 20px;
    height: 80%;
    &::before {
      content: '';
      border-top-left-radius: 0px;
      border-top-right-radius: 0px;
      border-bottom-right-radius: 90% 100%;
      border-bottom-left-radius: 0px;
      position: absolute;
      top: 0;
      left: 0;
      background-color: #FBFBFC;
      width: 20px;
      height: 100%;
      z-index: 10;
    }
  }
}

.comment {
  position :absolute;
  left: 20px;
  z-index: 5;
  width: 95%;
  height: 100%;
  background-color: #f1f3f6;
  // padding: 4px 0 4px 0px;
  border-radius: 10px 10px 10px 0;
  box-sizing: border-box;
  p:nth-of-type(1) {
    font-size: 12px;
    position: relative;
    transform: scaleX(0.9);
    margin: 4px 0 4px;
    padding-right:　40px;
    color: #999999;
    text-indent: -0.5em;
    span:nth-child(1) {
      color: #23A3DF;
    }
    span.time {
      position: absolute;
      right: 5px;
      top: 2px;
    }
  }
  p:nth-of-type(2) {
    font-size: 13px;
    color: #565656;
    white-space: nowrap;
    width: 100%;
    overflow: hidden;
    text-indent: 0.5em;
    text-overflow: ellipsis;
    span {
      color: #FF3333;
    }
  }
}

</style>
